﻿Imports System.Drawing
Imports System.Windows.Forms

Public Class EntityCollectionVisualizerForm

    Private Sub ButtonClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonClose.Click
        Me.Close()
    End Sub

    Private Sub dgvData_CellFormatting(ByVal sender As Object, ByVal e As DataGridViewCellFormattingEventArgs) _
            Handles dgvData.CellFormatting
        If (e.ColumnIndex Mod 2 = 1) Then
            Dim drv As DataRowView = DirectCast(dgvData.Rows(e.RowIndex).DataBoundItem, DataRowView)
            If (drv(e.ColumnIndex + 1).ToString.ToLower = "true") Then
                ' apply different format on changed data
                Dim font As New Font(dgvData.Font, dgvData.Font.Style Or FontStyle.Bold)
                e.CellStyle.Font = font
                'e.CellStyle.BackColor = SystemColors.Highlight
                'e.CellStyle.ForeColor = SystemColors.HighlightText
            End If
        End If
    End Sub

End Class